package com.yundahh.u8c.entity.sale;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 审批销售订单的请求参数
 * https://apidoc.yyu8c.com/#/app/Description?apilinkapikey=ed3c875a-6b9a-44d2-926f-1bc08f45d5e3
 */
@Data
public class SaleOrderApproveParam {
    private ApproveInfo approveinfo;
    private QueryInfo queryinfo;

    // 非静态内部类（需依赖外部类实例）
    @Data
    private class ApproveInfo {
        private String approveDate;
        private String approvid;
        private String note;
        private String status;
    }

    @Data
    private class QueryInfo {
        private List<String> code=new ArrayList<>();
        private String corp;
    }

    public SaleOrderApproveParam(String code, String corp ,String approvid,String node,String approveDate){
        this.queryinfo = new QueryInfo();
        this.queryinfo.code.add(code);
        this.queryinfo.corp = corp;
        this.approveinfo = new ApproveInfo();
        this.approveinfo.approveDate = approveDate;
        this.approveinfo.approvid = approvid;
    }
}